package com.bw.module_service.fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.bw.module_service.R
import com.bw.module_service.adapter.CardAdapter
import com.bw.module_service.model.CardItem


class HuangjinFragment : Fragment() {


    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        val view = inflater.inflate(R.layout.fragment_huangjin, container, false)
        val rv=view.findViewById<RecyclerView>(R.id.rv)
        rv.layoutManager= GridLayoutManager(requireContext(), 3)
        val cardlist= listOf(
            CardItem(R.drawable.percent, "商家9.5折"),
            CardItem(R.drawable.money, "10积分抵1元"),
            CardItem(R.drawable.park, "10元停车券"),
        )
        val adapter= CardAdapter(cardlist)
        rv.adapter=adapter
        return view
    }


}